package com.example.demospringretry.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.time.Duration;

@ConfigurationProperties(prefix = "biz.retry")
public class BizRetryProperties {

    @Getter
    @Setter
    private Integer maxAttempts = 3;

    @Getter
    @Setter
    private Backoff backoff;

    public static class Backoff {

        @Getter
        @Setter
        private Duration value = Duration.ofMillis(1000);

        @Getter
        @Setter
        private Integer multiplier = 0;
    }
}
